#include "crecipe.h"

CRecipe::CRecipe(QObject *parent) :
    CObject(parent)
{
//    m_id = KInvalidId;
    m_name = KNullString;
    m_picture = KNullString;
//    m_cuisine_id = KInvalidId;
    m_representative = false;
    m_description = KNullString;
    m_flavour_id = KInvalidId;
    m_tech_id = KInvalidId;
    m_prepare_time = 0;
    m_cooking_time = 0;
    m_difficulty = 0;
    m_dish_type_id = KInvalidId;
    m_food_type_id = KInvalidId;
    m_serve = 0;
}

//int CRecipe::id() {
//    return m_id;
//}

//void CRecipe::setId(int id) {
//    if (m_id != id) {
//        m_id = id;
//        emit idChanged();
//    }
//}

//int CRecipe::cuisineId() {
//    return m_cuisine_id;
//}

//void CRecipe::setCuisineId(int id) {
//    if (m_cuisine_id != id) {
//        m_cuisine_id = id;
//        emit cuisineIdChanged();
//    }
//}

QString CRecipe::name() {
    return m_name;
}

void CRecipe::setName(QString name) {
    if (m_name != name) {
        m_name = name;
        emit nameChanged();
    }
}

//QString CRecipe::description() {
//    return m_description;
//}

//void CRecipe::setDescription(QString description) {
//    if (m_description != description) {
//        m_description = description;
//        emit descriptionChanged();
//    }
//}

bool CRecipe::representative() {
    return m_representative;
}

void CRecipe::setRepresentative(bool rep) {
    if (m_representative != rep) {
        m_representative = rep;
        emit representativeChanged();
    }
}

QString CRecipe::description()
{
    return m_description;
}

void CRecipe::setDescription(QString describe)
{
    if (m_description != describe) {
        m_description = describe;
        emit descriptionChanged();
    }
}

int CRecipe::flavourId() {
    return m_flavour_id;
}

void CRecipe::setFlavourId(int flavourId) {
    if (m_flavour_id != flavourId) {
        m_flavour_id = flavourId;
        emit flavourIdChanged();
    }
}

int CRecipe::techId() {
    return m_tech_id;
}

void CRecipe::setTechId(int techId) {
    if (m_tech_id != techId) {
        m_tech_id = techId;
        emit techIdChanged();
    }
}

int CRecipe::prepareTime() {
    return m_prepare_time;
}

void CRecipe::setPrepareTime(int time) {
    if (m_prepare_time != time) {
        m_prepare_time = time;
        emit prepareTimeChanged();
    }
}

int CRecipe::cookingTime() {
    return m_cooking_time;
}

void CRecipe::setCookingTime(int time) {
    if (m_cooking_time != time) {
        m_cooking_time = time;
        emit cookingTimeChanged();
    }
}

int CRecipe::difficulty() {
    return m_difficulty;
}

void CRecipe::setDifficulty(int diff) {
    if (m_difficulty != diff) {
        m_difficulty = diff;
        emit difficultyChanged();
    }
}

int CRecipe::dishTypeId() {
    return m_dish_type_id;
}

void CRecipe::setDishTypeId(int typeId) {
    if (m_dish_type_id != typeId) {
        m_dish_type_id = typeId;
        emit dishTypeIdChanged();
    }
}

int CRecipe::foodTypeId() {
    return m_food_type_id;
}

void CRecipe::setFoodTypeId(int typeId) {
    if (m_food_type_id != typeId) {
        m_food_type_id = typeId;
        emit foodTypeIdChanged();
    }
}

int CRecipe::serve() {
    return m_serve;
}
void CRecipe::setServe(int serve) {
    if (m_serve != serve) {
        m_serve = serve;
        emit serveChanged();
    }
}

QString CRecipe::picture() {
    return m_picture;
}

void CRecipe::setPicture(QString picture) {
    if (m_picture != picture) {
        m_picture = picture;
        emit pictureChanged();
    }
}
